-
Notifications
You must be signed in to change notification settings - Fork 47
Add biome-config-godaddy
#1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add biome-config-godaddy
#1189
Conversation
packages/biome-config-godaddy/.grit/no_anonymous_function_expressions.grit
Outdated
Show resolved
Hide resolved
packages/biome-config-godaddy/.grit/no_anonymous_function_expressions.grit
Outdated
Show resolved
Hide resolved
packages/biome-config-godaddy/.grit/no_anonymous_functions.grit
Outdated
Show resolved
Hide resolved
packages/biome-config-godaddy/.grit/no_anonymous_single_param.grit
Outdated
Show resolved
Hide resolved
| "indentStyle": "space", | ||
| "indentWidth": 2, | ||
| "lineEnding": "lf", | ||
| "lineWidth": 130 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Biome let you override this for those of us that like ye olde 80 columns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will let you override any rule that's not from a grit plugin currently.
| @@ -0,0 +1,285 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these let you inherit? It'd be nice if our JS & TS weren't copy pasted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there is no way to do that currently, the extends field does not work for direct file paths. The docs specify that "paths in a shared configuration are interpreted from the location of the configuration that is extending it" and biome files must be .json or .jsonc currently unless they allow more file types in the future.
jpage-godaddy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly just have questions about the custom rules
Your concerns are valid, but I just tested my work again and realized that the plugin path parsing doesn't work as I expected for shared configs. It was referencing an identical local grit configuration in the main path of the project I was testing in so I'll have to remove it and possibly replace it in a separate package, and if so I'll adjust what I have now with your recommendations in mind. |
Summary
This PR introduces
biome-config-godaddy, a new Biome configuration package that provides a fast, Rust-based alternative to our existing ESLint and Prettier configurations. There are two config files provided in this package - a JS versionbiome.jsonbased oneslint-config-godaddy, and a TS versionbiome-ts.jsonbased oneslint-config-godaddy-typescript.Motivation
As JavaScript tooling evolves, teams are seeking faster linting and formatting solutions that maintain the same code quality standards. Biome offers significant performance improvements over traditional ESLint + Prettier setups while providing equivalent functionality. This package enables GoDaddy teams to adopt modern tooling without sacrificing our established coding standards.
Key details
eslint-config-godaddyrules and their Biome equivalents (also note that this is not a 1:1 mapping, many rules are less precise than in eslint).pluginsfeature, as well as many newer rules that align with our current eslint equivalents.jsonsection to each configuration file to mimic theeslint-plugin-jsonrules.useSingleJsDocAsteriskrule to match Biome's equivalency list.eslint-plugin-mochais already handled by Biome due to its domain feature, which automatically enables rules that belong to a domain with certain package specific dependencies. Read more about domains here.Changeset
Test Plan
I tested this change by ensuring that all rules included could be properly overridden in a consuming project. I tested this by symlinking the configurations locally and using it to extend a configuration file in one of my local projects.